#
# docker build -t elasticsearch -f elasticsearch/Dockerfile .
#

FROM ubuntu:xenial

COPY ./common/sources.list /etc/apt/sources.list
RUN apt-get -y update --fix-missing && apt-get -y update

# JAVA环境
RUN apt-get install -y openjdk-8-jdk apt-transport-https

# 创建用户
RUN groupadd -r elasticsearch && useradd -r -l -d /home/elasticsearch -g elasticsearch -m elasticsearch

# 切换用户
USER elasticsearch
WORKDIR /home/elasticsearch
RUN mkdir data
